<template>
  <div>
    <img class="headerimg" src="https://xd-video-pc-img.oss-cn-beijing.aliyuncs.com/xdclass_pro/bannner/1901/learn.png"
      alt="">
    <van-cell-group>
      <van-cell :title="item.label" is-link v-for="item in minearry" @click="itemclick(item)" :key="item.label" />
    </van-cell-group>
  </div>
</template>
<script>
export default {
  data () {
    return {
      minearry: [
        { label: '商品收藏' },
        { label: '我的足迹' },
        { label: '店铺收藏' },
        { label: '我的订单' },
        { label: '退出', type: 'exit' },
      ]
    }
  },
  methods: {
    itemclick (item) {
      if (item.type == 'exit') {
        this.$store.commit('setToken', '')
        localStorage.removeItem('token')
        this.$router.push({ path: '/login' })
      }
    }
  }
}
</script>
<style scoped>
.headerimg {
  height: 150px;
  width: 100%;
}
</style>
